
def count_Weight

model = Sketchup.active_model
prompts = ["比重"]
defaults = ["7.85"]
input = UI.inputbox(prompts, defaults, "吨/立方米")

volumeXs = 61023.744094732334   #体积系数

selection = model.selection
count = 0
selection.each { |entity| 

   if  entity.volume > 0

        puts entity.volume/volumeXs
        count += entity.volume

   end
}
   puts "合计：" 
   puts count*input[0].to_f/volumeXs


end